#ifndef MUSIC_H
#define MUSIC_H
#include<QUrl>

class Music
{
public:
    Music();
    Music(QUrl url);
    void setMusicId(const QString& musicId);
    void setMusicName(const QString& musicName);
    void setMusicSinger(const QString& musicSinger);
    void setMusicAlbum(const QString& musicAlbum);
    void setDuration(qint64 durable);
    void setMusicUrl(const QString& musicUrl);
    void setIsLike(bool isLike);
    void setIsHistory(bool isHestory);

    QString getMusicName()const;
    QString getMusicSinger()const;
    QString getMusicAlbum()const;
    qint64 getDuration()const;
    bool getIsLike()const;
    bool getIsHistory()const;
    QUrl getMusicUrl()const;
    QString getMusicId()const;

    QString getLrcFilePath()const;
    void writeMusicToDB();

private:
    void parseMediaMetaDate();

private:
    QString musicName;
    QString musicSinger;
    QString musicAlbum;
    qint64 duration;
    QUrl musicUrl;
    bool isLike;
    bool isHistory;
    QString musicId;
};

#endif // MUSIC_H
